<!-- INCLUDE sv_overall_header.html -->

<script type="text/javascript" src="ofc/js/json/json2.js"></script>
<script type="text/javascript" src="ofc/js/swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("ofc/open-flash-chart.swf", "my_chart", "950", "550", "9.0.0");
</script>

<script type="text/javascript">

function ofc_ready()
{
    //alert('ofc_ready');
}

function open_flash_chart_data()
{
    //alert( 'reading data' );
    return JSON.stringify(data);
}

function findSWF(movieName) {
  if (navigator.appName.indexOf("Microsoft")!= -1) {
    return window[movieName];
  } else {
    return document[movieName];
  }
}
    
var data = {JASON_STRING};

</script>

<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
	<form method="post" action="{S_LOGIN_ACTION}" class="headerspace">
	<h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></h3>
		<fieldset class="quick-login">
			<label for="username">{L_USERNAME}:</label>&nbsp;<input type="text" name="username" id="username" size="10" class="inputbox" title="{L_USERNAME}" />
			<label for="password">{L_PASSWORD}:</label>&nbsp;<input type="password" name="password" id="password" size="10" class="inputbox" title="{L_PASSWORD}" />
			<!-- IF S_AUTOLOGIN_ENABLED -->
				| <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label>
			<!-- ENDIF -->
			<input type="submit" name="login" value="{L_LOGIN}" class="button2" />
			{S_LOGIN_REDIRECT}
		</fieldset>
	</form>
<!-- ENDIF -->

<div class="panel" > 
	<div class="inner"><span class="corners-top"><span></span></span> 
	<h2>Poll  List </h2> 
	</div>
	
	<!-- BEGIN poll_list -->
	<table border="0" cellpadding="5" cellspacing="5">
		<tr>
			<td>Topic ID: {poll_list.TOPIC_ID}</td>
			<td>{poll_list.POLL_TITLE}</td>
		</tr>
		<tr>
			<td>
			<!-- IF poll_list.POLL_ENDED == false -->
			Running
			<!-- ENDIF -->
			<!-- IF poll_list.POLL_ENDED -->
			Ended
			<!-- ENDIF -->			
			</td>
			<td>
			<!-- IF poll_list.POLL_ENDED == false -->
			<form method="POST" action={S_STOP_POLL}>	
				<input name=submit type="submit" value='Stop'></input>
				<input name="mode" value="stop_poll" type="hidden"></input>
				<input name="stop_poll_topic_id" value={poll_list.TOPIC_ID} type="hidden"></input>
			</form>			
			<!-- ELSE -->
			<form method="POST" action={S_RESUME_POLL}>	
				<input name=submit type="submit" value='Resume'></input>
				<input name="mode" value="resume_poll" type="hidden"></input>
				<input name="resume_poll_topic_id" value={poll_list.TOPIC_ID} type="hidden"></input>
			</form>		
			<!-- ENDIF -->
			</td>
		</tr>
		<tr>
			<td>Option ID</td>
			<td>Text</td>
			<td>Total</td>
			<td>Users </td>
			
		</tr>
			
		<!-- BEGIN poll_option_list -->
		<tr>	
			<td><p>{poll_list.poll_option_list.POLL_OPTION_ID}</p></td>
			<td><p>{poll_list.poll_option_list.POLL_OPTION_TEXT}</p></td>
			<td><p>{poll_list.poll_option_list.POLL_OPTION_TOTAL}</p></td>
			<td>
				<!-- BEGIN user -->
				{poll_list.poll_option_list.user.USER_NAME}, 
				<!-- END user -->
			</td>
		</tr>	
		<!-- END poll_option_list -->
		
		
	</table>	
	<br>
	<!-- END poll_list -->
	
</div>


<!-- INCLUDE sv_overall_footer.html -->